﻿using ApplicationLibrary.SqlConnector;
using System;

namespace Fighter.Masters.ModuleData
{
    #region FG_Titles

    public class FG_Titles : Table
    {
        public static string Name = "FG_Titles";

        public static Column<string> Title = new Column<string>(Name, Properties.Resources.C_Title, "Title", LEN.CODE, false);
        public static Column<string> Description = new Column<string>(Name, Properties.Resources.C_Description, "Text", LEN.BIG_DESCRIPTION);

        public override iColumn ForeignKey
        {
            get { return Title; }
        }

        public FG_Titles()
        {
            VisibleInRadar(new iColumn[] { Title, Description });
            Tablename = Name;
            DefineKey(new iColumn[] { Title });
        }
    }

    #endregion

    #region FG_Descriptions

    public class FG_Descriptions : Table
    {
        public static string Name = "FG_Descriptions";

        public static Column<DescriptionType> Type = new Column<DescriptionType>(Name, "", "Type", false);
        public static Column<int> ID = new Column<int>(Name, "", "ID", false);
        public static Column<string> Description = new Column<string>(Name, Properties.Resources.C_Description, "Description", LEN.BIG_DESCRIPTION);

        public override iColumn ForeignKey
        {
            get { return ID; }
        }

        public FG_Descriptions()
        {
            VisibleInRadar(new iColumn[] { ID, Description });
            Tablename = Name;
            DefineKey(new iColumn[] { Type, ID });
        }
    }

    #endregion

    #region FG_Club
    public class FG_Club : Table
    {
        public static string Name = "FG_Club";

        public static Column<string> Mail = new Column<string>(Name, Properties.Resources.C_Mail, "Mail", LEN.DESCRIPTION, false);
        public static Column<string> Club = new Column<string>(Name, Properties.Resources.C_Club, "Club", LEN.DESCRIPTION);
        public static Column<string> City = new Column<string>(Name, Properties.Resources.C_City, "City", LEN.DESCRIPTION);
        public static Column<int> Region = new Column<int>(Name, Properties.Resources.C_Region, "Region");
        public static Column<string> Phone = new Column<string>(Name, Properties.Resources.C_Phone, "Phone", LEN.DESCRIPTION);

        public override iColumn ForeignKey
        {
            get { return Mail; }
        }

        public FG_Club()
        {
            VisibleInRadar(new iColumn[] { Club, City, Mail });
            Tablename = Name;
            DefineKey(new iColumn[] { Mail });
        }
    }
    #endregion

    #region FG_Coach
    public class FG_Coach : Table
    {
        public static string Name = "FG_Coach";

        public static Column<string> Mail = new Column<string>(Name, Properties.Resources.C_Mail, "Mail", LEN.DESCRIPTION, false);
        public static Column<int> Line = new Column<int>(Name, "", "Line", false);
        public static Column<string> FirstName = new Column<string>(Name, Properties.Resources.C_Name, "FirstName", LEN.DESCRIPTION);
        public static Column<string> Phone = new Column<string>(Name, Properties.Resources.C_Phone, "Phone", LEN.DESCRIPTION);

        public override iColumn ForeignKey
        {
            get { return Mail; }
        }

        public FG_Coach()
        {
            Tablename = Name;
            DefineKey(new iColumn[] { Mail, Line });
        }
    } 
    #endregion

    #region FG_Athlete
    public class FG_Athlete : Table
    {
        public static string Name = "FG_Athlete";

        public static Column<string> Mail = new Column<string>(Name, "", "Mail", LEN.DESCRIPTION, false);
        public static Column<int> ID = new Column<int>(Name, "", "ID", false);
        public static Column<string> FirstName = new Column<string>(Name, Properties.Resources.C_Name, "FirstName", LEN.DESCRIPTION);
        public static Column<Gender> Gender = new Column<Gender>(Name, Properties.Resources.C_Gender, "Gender");
        public static Column<DateTime> BirthDay = new Column<DateTime>(Name, Properties.Resources.C_Birthday, "Birthday");
        public static Column<float> Weight = new Column<float>(Name, Properties.Resources.C_Weight, "Weight");
        public static Column<int> Belt = new Column<int>(Name, Properties.Resources.C_Belt, "Belt");
        public static Column<string> GrapLevel = new Column<string>(Name, "", "GrapLevel", 1);
        public static Column<int> FContMatch = new Column<int>(Name, "", "FContMatch");
        public static Column<int> LKickMatch = new Column<int>(Name, "", "LKickMatch");
        public static Column<int> K1RulMatch = new Column<int>(Name, "", "K1RulMatch");
        public static Column<string> Club = new Column<string>(Name, Properties.Resources.C_Club, "Club", LEN.DESCRIPTION, true);

        public override iColumn ForeignKey
        {
            get { return ID; }
        }

        public FG_Athlete()
        {
            VisibleInRadar(new iColumn[] { ID, Mail, FirstName, Club });
            Tablename = Name;
            DefineKey(new iColumn[] { ID });
        }
    }
    #endregion
}